﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.Attachment
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.Attachment;

    public class MapAttachmentData : ClassMapping<AttachmentData>
    {
        public MapAttachmentData()
        {
            //映射ID，上传附件时，ID与附件记录的ID相同
            Id(x => x.Id, map =>
            {
                map.Length(40);
            });

            //附件当前文件名
            Property(x => x.AttBytes, map =>
            {
                map.Length(50000);
            });
        }
    }
}
